package com.lanhao.aot.carrierintegration.commondto;

import java.math.BigDecimal;

public class LabelRemoteGetResponse {

	private String taskNo;
	private String labelUrl;
	private String labelNo;
	private String waybillNo;
	private String carrierName;
	private BigDecimal postage;
	
	private String respParam;
	private boolean success;
	private String errorCode;
	private String errorMsg;

	public LabelRemoteGetResponse() {
	}

	public LabelRemoteGetResponse(Boolean success, String errorCode, String errorMsg) {
		this.success = success;
		this.errorCode = errorCode;
		this.errorMsg = errorMsg;
	}

	public String getTaskNo() {
		return taskNo;
	}

	public void setTaskNo(String taskNo) {
		this.taskNo = taskNo;
	}

	public String getLabelUrl() {
		return labelUrl;
	}

	public void setLabelUrl(String labelUrl) {
		this.labelUrl = labelUrl;
	}

	public String getLabelNo() {
		return labelNo;
	}

	public void setLabelNo(String labelNo) {
		this.labelNo = labelNo;
	}
	
	public String getWaybillNo() {
		return waybillNo;
	}

	public void setWaybillNo(String waybillNo) {
		this.waybillNo = waybillNo;
	}

	public String getCarrierName() {
		return carrierName;
	}

	public void setCarrierName(String carrierName) {
		this.carrierName = carrierName;
	}

	public BigDecimal getPostage() {
		return postage;
	}

	public void setPostage(BigDecimal postage) {
		this.postage = postage;
	}

	public boolean isSuccess() {
		return success;
	}

	public void setSuccess(boolean success) {
		this.success = success;
	}

	public String getErrorCode() {
		return errorCode;
	}

	public void setErrorCode(String errorCode) {
		this.errorCode = errorCode;
	}

	public String getErrorMsg() {
		return errorMsg;
	}

	public void setErrorMsg(String errorMsg) {
		this.errorMsg = errorMsg;
	}
	
	public String getRespParam() {
		return respParam;
	}

	public void setRespParam(String respParam) {
		this.respParam = respParam;
	}

	public static LabelRemoteGetResponse getSuccess() {
		return new LabelRemoteGetResponse(Boolean.TRUE, "0", "成功");
	}

	public static LabelRemoteGetResponse getFail(String errorCode, String reason) {
		return new LabelRemoteGetResponse(Boolean.FALSE, errorCode, reason);
	}
	
	public static LabelRemoteGetResponse getFail(String reason) {
		return new LabelRemoteGetResponse(Boolean.FALSE, "9999", reason);
	}

}
